package org.kernelab.numeric.apps;

import org.kernelab.basis.Tools;

public class Test implements Runnable
{

	private int	test;

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		long stamp = Tools.getTimeTrace();

		ThreadGroup group = new ThreadGroup("");

		Test test = new Test();

		for (int i = 0; i < 2; i++) {
			Thread t = new Thread(group, test);
			t.start();
		}

		while (group.activeCount() != 0) {

		}

		Tools.debug(test.test);
		Tools.debug(Tools.getTimeStamp() - stamp);
	}

	public Test()
	{
		test = 0;
	}

	@Override
	public void run()
	{
		for (int i = 0; i < 5000; i++) {
			test = test + 1 * 1;
		}
	}
}
